// @ts-ignore
/* eslint-disable */
import request from '@/utils/request'

/** 此处后端没有提供注释 POST /refund/applyRefund */
export async function applyRefund(
  body: CartService.RefundApplyDTO,
  options?: { [key: string]: any }
) {
  return request<CartService.ResultRefundVO>(`/cart/refund/applyRefund`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /refund/getRefundRequestByUserId */
export async function getRefundRequestByUserId(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: CartService.getRefundRequestByUserIdParams,
  options?: { [key: string]: any }
) {
  return request<CartService.Result>(`/cart/refund/getRefundRequestByUserId`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 PUT /refund/quitRefundRequest */
export async function quitRefundRequest(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: CartService.quitRefundRequestParams,
  options?: { [key: string]: any }
) {
  return request<any>(`/cart/refund/quitRefundRequest`, {
    method: 'PUT',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 PUT /refund/updateRefundRequest */
export async function updateRefundRequest(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: CartService.updateRefundRequestParams,
  options?: { [key: string]: any }
) {
  return request<any>(`/cart/refund/updateRefundRequest`, {
    method: 'PUT',
    params: {
      ...params,
      refundRequest: undefined,
      ...params['refundRequest'],
    },
    ...(options || {}),
  })
}
